package com.taikang.common.util;

public class CompanyUtil {
	/***
	 * add by fee 20091010
	 * 由公司代码获得公司名称
	 * @param comId
	 * @return
	 */
	public static String getCompanyName(String comId)
	{
		String comName = "";
		if(!StringUtils.isEmpty(comId))
		{
			if(comId.equals("*")){comName = "总公司"; }    
			else if(comId.trim().equals("01")){comName = "北京分公司"; }    
			else if(comId.trim().equals("02")){comName = "湖北分公司"; }    
			else if(comId.trim().equals("03")){comName = "广东分公司"; }    
			else if(comId.trim().equals("04")){comName = "上海分公司"; }    
			else if(comId.trim().equals("05")){comName = "四川分公司"; }    
			else if(comId.trim().equals("06")){comName = "辽宁分公司"; }    
			else if(comId.trim().equals("12")){comName = "陕西分公司"; }    
			else if(comId.trim().equals("07")){comName = "江苏分公司"; }    
			else if(comId.trim().equals("09")){comName = "浙江分公司"; }    
			else if(comId.trim().equals("10")){comName = "山东分公司"; }    
			else if(comId.trim().equals("08")){comName = "河南分公司"; }    
			else if(comId.trim().equals("11")){comName = "天津分公司"; }    
			else if(comId.trim().equals("13")){comName = "重庆分公司"; }    
			else if(comId.trim().equals("14")){comName = "福建分公司"; } 
			else if(comId.trim().equals("29")){comName = "厦门分公司"; }
			else if(comId.trim().equals("15")){comName = "湖南分公司"; }    
			else if(comId.trim().equals("16")){comName = "深圳分公司"; }    
			else if(comId.trim().equals("17")){comName = "安徽分公司"; }    
			else if(comId.trim().equals("18")){comName = "大连分公司"; }    
			else if(comId.trim().equals("19")){comName = "青岛分公司"; }    
			else if(comId.trim().equals("20")){comName = "宁波分公司"; }    
			else if(comId.trim().equals("21")){comName = "河北分公司"; }    
			else if(comId.trim().equals("22")){comName = "黑龙江分公"; }    
			else if(comId.trim().equals("23")){comName = "云南分公司"; }    
			else if(comId.trim().equals("26")){comName = "吉林分公司"; }    
			else if(comId.trim().equals("24")){comName = "山西分公司"; }    
			else if(comId.trim().equals("28")){comName = "新疆分公司"; }    
			else if(comId.trim().equals("27")){comName = "江西分公司"; }    
			else if(comId.trim().equals("25")){comName = "广西分公司"; }    
			else if(comId.trim().equals("30")){comName = "内蒙古分公司";}    
			else if(comId.trim().equals("32")){comName = "甘肃分公司"; }    
			else if(comId.trim().equals("31")){comName = "贵州分公司"; } 
		}
		return comName;
	}
	
	/***
	 * add by fee 20091010
	 * 由公司OA代码获得公司station代码
	 * @param comId
	 * @return
	 */
	public static String getStationID(String comId)
	{
		String stationId = "";
		if(!StringUtils.isEmpty(comId))
		{
			if(comId.equals("90")){stationId = "*"; }    
			else if(comId.trim().equals("113")){stationId = "01"; }    
			else if(comId.trim().equals("253")){stationId = "02"; }    
			else if(comId.trim().equals("797")){stationId = "03"; }    
			else if(comId.trim().equals("873")){stationId = "04"; }    
			else if(comId.trim().equals("144")){stationId = "05"; }    
			else if(comId.trim().equals("228")){stationId = "06"; }    
			else if(comId.trim().equals("487")){stationId = "12"; }    
			else if(comId.trim().equals("192")){stationId = "07"; }    
			else if(comId.trim().equals("664")){stationId = "09"; }    
			else if(comId.trim().equals("586")){stationId = "10"; }    
			else if(comId.trim().equals("553")){stationId = "08"; }    
			else if(comId.trim().equals("216")){stationId = "11"; }    
			else if(comId.trim().equals("856")){stationId = "13"; } 
			else if(comId.trim().equals("465")){stationId = "14"; }
			else if(comId.trim().equals("486")){stationId = "29"; }    
			else if(comId.trim().equals("391")){stationId = "15"; }    
			else if(comId.trim().equals("501")){stationId = "16"; }    
			else if(comId.trim().equals("444")){stationId = "17"; }    
			else if(comId.trim().equals("825")){stationId = "18"; }    
			else if(comId.trim().equals("290")){stationId = "19"; }    
			else if(comId.trim().equals("314")){stationId = "20"; }    
			else if(comId.trim().equals("520")){stationId = "21"; }    
			else if(comId.trim().equals("538")){stationId = "22"; }    
			else if(comId.trim().equals("323")){stationId = "23"; }    
			else if(comId.trim().equals("10077")){stationId = "26"; }    
			else if(comId.trim().equals("10085")){stationId = "24"; }    
			else if(comId.trim().equals("10081")){stationId = "28"; }    
			else if(comId.trim().equals("10079")){stationId = "27"; }    
			else if(comId.trim().equals("10083")){stationId = "25";}    
			else if(comId.trim().equals("1153208013498117")){stationId = "30"; }    
			else if(comId.trim().equals("1153207443458444")){stationId = "32"; }
			else if(comId.trim().equals("1153208050151811")){stationId = "31"; }
		}
		return stationId;
	}
	
	
	/***
	 * add by fee 20091010
	 * 由公司OA代码获得公司CSC代码
	 * @param comId
	 * @return
	 */
	public static String getCSCID(String comId)
	{
		String cscId = "";
		if(!StringUtils.isEmpty(comId))
		{
			if(comId.equals("90")){cscId = "0"; }    
			else if(comId.trim().equals("113")){cscId = "1"; }    
			else if(comId.trim().equals("253")){cscId = "2"; }    
			else if(comId.trim().equals("797")){cscId = "3"; }    
			else if(comId.trim().equals("873")){cscId = "4"; }    
			else if(comId.trim().equals("144")){cscId = "5"; }    
			else if(comId.trim().equals("228")){cscId = "6"; }    
			else if(comId.trim().equals("487")){cscId = "7"; }    
			else if(comId.trim().equals("192")){cscId = "A"; }    
			else if(comId.trim().equals("664")){cscId = "B"; }    
			else if(comId.trim().equals("586")){cscId = "C"; }    
			else if(comId.trim().equals("553")){cscId = "D"; }    
			else if(comId.trim().equals("216")){cscId = "E"; }    
			else if(comId.trim().equals("856")){cscId = "F"; } 
			else if(comId.trim().equals("465")){cscId = "G"; }
			else if(comId.trim().equals("486")){cscId = "G60"; }    
			else if(comId.trim().equals("391")){cscId = "H"; }    
			else if(comId.trim().equals("501")){cscId = "I"; }    
			else if(comId.trim().equals("444")){cscId = "J"; }    
			else if(comId.trim().equals("825")){cscId = "K"; }    
			else if(comId.trim().equals("290")){cscId = "L"; }    
			else if(comId.trim().equals("314")){cscId = "M"; }    
			else if(comId.trim().equals("520")){cscId = "N"; }    
			else if(comId.trim().equals("538")){cscId = "O"; }    
			else if(comId.trim().equals("323")){cscId = "P"; }    
			else if(comId.trim().equals("10077")){cscId = "Q"; }    
			else if(comId.trim().equals("10085")){cscId = "R"; }    
			else if(comId.trim().equals("10081")){cscId = "S"; }    
			else if(comId.trim().equals("10079")){cscId = "T"; }    
			else if(comId.trim().equals("10083")){cscId = "U";}    
			else if(comId.trim().equals("1153208013498117")){cscId = "V"; }    
			else if(comId.trim().equals("1153207443458444")){cscId = "W"; }
			else if(comId.trim().equals("1153208050151811")){cscId = "Y"; }
		}
		return cscId;
	}
	

	
	
	/***
	 * add by fee 20091015
	 * 由岗位代码获得岗位名称
	 * @param comId
	 * @return
	 */
	
	public static String getPostName(String postId)
	{
		String postName = "";
		if(!StringUtils.isEmpty(postId))
		{
			if(postId.equals("1")){postName = "123工程专项岗"; }    
			else if(postId.trim().equals("2")){postName = "代理人培训岗"; }    
			else if(postId.trim().equals("3")){postName = "产品培训岗"; }    
			else if(postId.trim().equals("4")){postName = "营销员培训岗"; }    
			else if(postId.trim().equals("5")){postName = "主管培训岗"; }    
			else if(postId.trim().equals("6")){postName = "教材管理岗"; }    
			else if(postId.trim().equals("7")){postName = "企划岗"; }    
			else if(postId.trim().equals("8")){postName = "综合管理岗"; }    
			else if(postId.trim().equals("9")){postName = "讲师培训岗"; }    
			else if(postId.trim().equals("10")){postName = "讲师管理岗"; }    
			else if(postId.trim().equals("11")){postName = "组训培训岗"; }    
			else if(postId.trim().equals("12")){postName = "培训部经理"; }        
		}
		return postName;
	}
}
